<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

    <script>
        // 全局作用域

    // let object = { first: 'Bill', last: 'Gates' };

    // let { first: firstName, last: lastName } = object;

    // console.log(firstName+'\t'+lastName); 
    // Bill Gates


    var tmp = new Date();

    function f(){
        // 局部作用域
        // var tmp 

        console.log(tmp);

        if (false){
            var tmp = "hello world";
        }
    }

    f()

    // console.log(tmp)
    </script>
</body>
</html>